home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DBVGAL17.ARJ / DEMOS.ARJ / L40.ASM < prev    next >
Assembly Source File  |  1992-01-25  |  2KB  |  61 lines

  1.         name    _L40set
  2.         ;   void L40set(void);
  3. L40_TEXT       segment byte public 'CODE'
  4.         assume  cs:L40_TEXT
  5.         org     100h
  6. _L40set:
  7.         mov     ax,1202h        ; scanline = 400
  8.         mov     bl,30h
  9.         int     10h
  10.         cmp     al,12h
  11.         jne     @out            ; bailout if not VGA
  12.  
  13.         MOV     AX,0003         ; textmode 0x03
  14.         INT     10h      
  15.  
  16.         MOV     AX,1111h        ; 8x14 char set & video parameters
  17.         MOV     BL,00   
  18.         INT     10h      
  19.  
  20.         MOV     AX,1102h        ; set 8 point font
  21.         MOV     BL,00   
  22.         INT     10h      
  23.  
  24.         mov     dx,03d4h        ; update CRTC register 9
  25.         mov     al,09h
  26.         out     dx,al
  27.         inc     dx
  28.         in      al,dx
  29.         and     al,0e0h
  30.         or      al,09h
  31.         out     dx,al
  32.  
  33.         mov     dx,03d4h        ; update CRTC register 12h
  34.         mov     ax,9012h
  35.         out     dx,ax
  36.  
  37.         push    ds
  38.         XOR     AX,AX   
  39.         MOV     DS,AX   
  40.         mov     ah,09
  41.         MOV     ds:[0485h],ah           ; update BIOScrtpoints 
  42.         mov     ah,27h
  43.         MOV     ds:[0484h],ah          ; update BIOScrtrows
  44.         mov     ah,40h
  45.         mov     ds:[044dh],ah          ; set page length to 16k
  46.         xor     ah,ah
  47.         mov     ds:[044ch],ah
  48.         pop     ds
  49.  
  50.         xor     al,al
  51.         mov     ah,1
  52.         mov     ch,9
  53.         mov     cl,0ah
  54.         int     10h     ; set cursor size
  55. @out:
  56.         mov     ax,4c00h
  57.         int     21h
  58. L40_TEXT        ends
  59.         end     _L40set
  60.  
  61.